import request from "../utils/request"
export default {
    login(params) {
        return request({
            url: "/users/login",
            method: "post",
            data: params,
            mock: false
        })
    },

    noticeCount(params) {
        return request({
            url: "/leave/count",
            method: "get",
            data: params,
            mock: true
        })
    },

    getMenuList() {
        return request({
            url: "/menu/list",
            method: "get",
            data: {},
            mock: false
        })
    },
    
    getPermissionList() {
        return request({
            url: "/users/permissionList",
            method: "get",
            data: {},
            mock: false
        })
    },

    getLeaveList(params) {
        return request({
            url: "/leave/list",
            method: "get",
            data: params,
            mock: false
        })
    },

    getUsersList(params) {
        return request({
            url: "/users/list",
            method: "get",
            data: params,
            mock: false
        })
    },


    getUsersAllList() {
        return request({
            url: "/users/all/list",
            method: "get",
            data: {},
            mock: false
        })
    },

    deleteUser(params) {
        return request({
            url: "/users/delete",
            method: "post",
            data: params,
            mock: false
        })
    },

    getAllRoleList() {
        return request({
            url: "/roles/allList",
            method: "get",
            data: {},
            mock: false
        })
    },

    getRoleList(params) {
        return request({
            url: "/roles/list",
            method: "get",
            data: params,
            mock: false
        })
    },


    getDeptList(params) {
        return request({
            url: "/dept/list",
            method: "get",
            data: params,
            mock: false
        })
    },

    // 用户创建编辑
    usersOperate(params) {
        return request({
            url: "/users/operate",
            method: "post",
            data: params,
            mock: false
        })
    },
    
    // 菜单创建编辑删除
    menusOperate(params) {
        return request({
            url: "/menu/operate",
            method: "post",
            data: params,
            mock: false
        })
    },

    rolesOperate(params){
        return request({
            url: "/roles/operate",
            method: "post",
            data: params,
            mock: false
        })
    },

    updatePermission(params){
        return request({
            url: "/roles/update/permission",
            method: "post",
            data: params,
            mock: false
        })
    },

    deptOperate(params){
        return request({
            url: "/dept/operate",
            method: "post",
            data: params,
            mock: false
        })
        
    },

    leaveOperate(params){
        return request({
            url: "/leave/operate",
            method: "post",
            data: params,
            mock: false
        })
    },

    // 获取云盘机列表
    getYunpanList() {
        return request({
            url: "/yunpan/list",
            method: "get",
            data: {},
            mock: true
        })
    },

    getCameraList() {
        return request({
            url: "/camera/list",
            method: "get",
            data: {},
            mock: true
        })
    },




}